-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#158) Split out list command to its own command class #3072
Conversation
34f871e
to
6e15f78
Compare
6e15f78
to
d2ec2ec
Compare
d2ec2ec
to
e489123
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things that jumped out at me. I'm still not complete going through everything, but just about to take a break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions here, but overall this looks good. Nice work! 💖
src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs
Outdated
Show resolved
Hide resolved
(chocolatey#158) Remove list alias for remote searches This commit removes the list alias for remote searches and renames the command class to be ChocolateySearchCommand to reflect it is for remote searches. As a side effect, the Info command now inherits from the search command which should be fine in most cases.
This commit moves everything related to listing local packages to its own new class that will only be responsible for listing local packages. This also changes the behavior of the search and find commands to only be able to search on remote feeds.
This commit updates the tab completion by removing the now unsupported arguments on the list command and remove local only arguments from the search command. Additionally, as it was found to be missing, the find command was also added to the tab completion.
Remove extraneous comments Space out Tags Add Tag parameter where missing.
Be explicit with unsupported arguments so we don't accidentally warn on packages with those names.
Thank you for getting this done @AdmiringWorm 👍 |
Description Of Changes
This pull requests splits out the list command to be its own command in the source codes, which can only handle local packages and not remote sources.
In this move, all arguments that had been deprecated for the list command have been completely removed from the list command, and a few remote only arguments will be warning about that they are unsupported (this won't do anything at all).
The tab completion file has also been updated with this new logic, with an adition that remote searches have had their local arguments removed from the tab completion.
Motivation and Context
To make list searching only local packages, while using search and find will be for remote sources.
Testing
choco list
choco search
against a feed not containing 1 or more of the installed pakcageschoco list --local-only
choco search --local-only --verbose
--local-only
choco info chocolatey --local-only
choco info upgradepackage
(against internal repository source)ListCommand
,SearchCommand
andInfoCommand
Operating Systems Testing
Change Types Made
Change Checklist
Related Issue
choco list
to be local only #158